package com.ruoyi.ipms_crm.mapper;

import com.ruoyi.ipms_crm.dto.*;
import com.ruoyi.ipms_crm.entity.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/*客户mapper层*/
@Mapper
public interface CustomerMapper {

    /*查找--通过id查找客户*/
    Customer selectCustomerById(Integer customerId);

    List<Customer> selectCustomerList(Customer customer);

    int insertCustomer(Customer customer);

    int updateCustomerById(Customer customer);

    int deleteCustomerByIds(Integer[] customerId);

    CustomerDetailsDto selectCustomerDetails(Integer customerId);

    List<CustomerAndInventorDto> selectInventorForCustomer(Integer customerId);

    List<CustomerAndApplicationDto> selectApplicantForCustomer(Integer customerId);

    List<CustomerOfContractDto> selectContractForCustomer(Integer customerId);

    List<CustomerOfCaseDto> selectCaseForCustomer(Integer customerId);

    List<Customer> selectRecycleCustomerList(Customer customer);

    int updateCustomer(List customerIds);


    /* 官方审核通过，客户业务业务次数+1 */
    int updatExperienceAndStatus(int customerId);
}
